package com.starry.db.core.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 数据删除枚举
 * @Author xiaoke
 *
 */
@Getter
@AllArgsConstructor
public enum DBDeletedStatusEnum {

    IS_DELETED(1, "已删除"),

    NOT_DELETED(0, "未删除");

    @EnumValue // 标注该字段是数据库里的字段
    private final Integer code;

    @JsonValue // 标注该字段要开启自定义序列化返回值
    private final String name;

    @Override
    public String toString() {
        return this.name;
    }
}
